import {ReactNode} from "react";
import { View,StyleSheet,Text } from "react-native";
interface WraperProps {
    title:string;
    desc?:string;
    children:ReactNode;
}

export const Wraper:React.FC<WraperProps> = (props) => {
    const {title,children,desc} = props;
    return (
        <View style={styles.wraper}>
            <View style={{flexDirection:"column",gap:16,marginBottom:20}}>
                <Text style={styles.title}>
                    功能：{title}
                </Text>
                <Text style={styles.desc}>描述：{desc??"暂无"}</Text>
            </View>
            {children}
        </View>
    )
}

const styles = StyleSheet.create({
    wraper:{
        marginBottom:30
    },
    title:{
        fontSize:16,
        fontWeight:"bold"
    },
    desc:{
        fontSize:14
    }
})